<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
    <th:block th:include="common/common::common('代码生成业务表管理')"/>
    <script th:src="@{/static/tools/index.js}" charset="utf-8"></script>
</head>
<body class="bg-color">
<div class="body_info">
    <div class="data_div">
        <!-- 表格 -->
        <div class="layui_table">
            <table class="layui-hide" id="layTable" lay-filter="layTableFilter"></table>
        </div>
    </div>
</div>

<!-- 操作工具栏 -->
<script type="text/html" id="toolbarHandle">
    <button type="button" lay-event="preview"
            sec:authorize="hasAuthority('tools:table:info:preview')"
            class="tool-bar-btn see-button">
        <i class="layui-icon layui-icon-list"></i>预览
    </button>
    <button type="button" sec:authorize="hasAuthority('tools:table:info:update')"
            class="tool-bar-btn edit-button" lay-event="edit">
        <i class="layui-icon layui-icon-edit"></i>编辑
    </button>
    <button type="button" sec:authorize="hasAuthority('tools:table:info:cloumn')"
            class="tool-bar-btn edit-button" lay-event="addColumn">
        <i class="layui-icon layui-icon-addition"></i>添加字段
    </button>
    <button type="button" sec:authorize="hasAuthority('tools:table:info:download')"
            class="tool-bar-btn edit-button" lay-event="btnGenerate">
        <i class="layui-icon layui-icon-download-circle"></i>生成代码
    </button>
    <button type="button" sec:authorize="hasAuthority('tools:table:info:delete')"
            class="tool-bar-btn remove-button" lay-event="del">
        <i class="layui-icon layui-icon-delete"></i>删除
    </button>
</script>


<script type="text/html" id="toolTableBar">
    <div class="tool-head-bar">
        <input class="layui-input float_left" placeholder="表名称"
               id="name" name="name" autocomplete="off">
        <button class="layui-btn layui-btn-sm layui-btn-normal search-btn float_left"
                data-type="reload" id="searchBtn">
            <i class="layui-icon layui-icon-search" style="margin-right: 3px"></i>搜索
        </button>
        <button sec:authorize="hasAuthority('tools:table:info:import')"
                class="layui-btn layui-btn-sm layui-btn-normal add-btn"
                onclick="saveTableInfo()">
            <i class="layui-icon layui-icon-release"></i>导入表
        </button>
        <button type="button" sec:authorize="hasAuthority('tools:table:info:download')"
                class="layui-btn layui-btn-sm layui-btn-normal add-btn"
                style="background-color: #6572ff;border-color: #6c87ff;"
                lay-event="getData" id="btnGenCode">
            <i class="layui-icon layui-icon-download-circle"></i>生成代码
        </button>
        <button type="button" sec:authorize="hasAuthority('tools:table:info:add')"
                class="layui-btn layui-btn-sm layui-btn-normal add-btn"
                lay-event="saveTableInfo" id="saveTableInfo"  onclick="addTableInfo()">
            <i class="layui-icon layui-icon-addition"></i>添加表
        </button>

    </div>
</script>

</body>
</html>